package com.samuel.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.UUID;

/**
 * @author kaiji
 * @since 2021-04-06 09:58:51
 */
@RestController
@RequestMapping("api")
public class ApiController {

    @Value("${server.port}")
    private String port;

    @GetMapping("index")
    public String index() {
        return "api port:" + port + " consul uuid ==>" + UUID.randomUUID().toString().replace("-", "");
    }
}
